<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>接收用户的输入</title>
    <style>
        .form-item label{
            width:100px;
            height:30px;
            display:inline-block;
            text-align: right;
            font-weight: bold;
            color:#333;
            font-family: 黑体;
        }
        .form-item input{
            height:25px;
            width:245px;
            border-radius: 5px;
        }
        .form-item{
            margin:10px 0;/*上下，左右*/

        }
        input[type=radio]{/*属性选择器*/
            width:30px;
        }
    </style>
</head>
<body>
<form>
    <div class="form-item">
    <label for="age">年龄：</label>
    <input id="age" type="text" name="age">
    </div>
    <div class="form-item">
        <label for="pass">密码：</label>
        <input id="pass" type="password" name="pass">
        </div>
    <div class="form-item">
        <label>性别：</label>
        <input type="radio" name="sex" value="man">男
        <input type="radio" name="sex" value="girl" checked>女
        <!--radio中的name必须相同，只有这样才会是单选-->
        </div>
    <div class="form-item">
        <label> </label>
    <input type="button" value="提交" onclick="subform()"><!--提交按钮被点击时就会调用subform()这个方法-->
<!--onclick()这个属性在所有标签上都可以定义-->
</div>
</form>
<script>
function subform(){

}
</script>
</body>
</html>